feat: [#121] Skip slow tests for Copilot agent with enhanced messaging#158
Merged
josecelano merged 2 commits intomainfrom Nov 7, 2025
Merged
feat: [#121] Skip slow tests for Copilot agent with enhanced messaging#158josecelano merged 2 commits intomainfrom
josecelano merged 2 commits intomainfrom
Conversation
- Rename environment variable: TORRUST_TD_SKIP_E2E_TESTS → TORRUST_TD_SKIP_SLOW_TESTS * Action-based naming is clearer and more flexible than condition-based * Can be used by developers locally for faster pre-commit checks - Expand what gets skipped in fast mode: * E2E provision and destroy tests (~44s) * E2E configuration tests (~48s) * Code coverage check (~1m 29s) * Total time saved: ~3 minutes (54.8% reduction) - Enhanced pre-commit messaging when slow tests are skipped: * Clear list of skipped tests with timing information * Exact commands to run each test separately (all < 5 min) * AI agents can choose to run them individually if time permits * Informative guidance about CI safety net - Add comprehensive timing tables to documentation: * Individual pre-commit task timings (7 tasks breakdown) * Detailed cargo test breakdown (8 test suites, 1529 tests) * Performance analysis showing what to skip and why - Reorganize Copilot agent documentation: * Created docs/contributing/copilot-agent/ folder * Moved firewall.md to new location * Added README.md index for all Copilot docs * Added pre-commit-config.md with comprehensive setup guide Performance Results: - Full mode: ~5m 30s (exceeds Copilot timeout) - Fast mode: ~3m 48s (31% faster, ~2 min safety margin) - Unit tests (1m 16s) kept in fast mode for quality assurance Related: - Issue #121 - Community Discussion: https://github.com/orgs/community/discussions/178998
- Created detailed guide on condition-based vs action-based naming - Includes decision frameworks, real-world examples, and best practices - Explains rationale for choosing TORRUST_TD_SKIP_SLOW_TESTS (action-based) - Added essential rule to Copilot instructions for creating new env vars - References both naming guide and prefix ADR for complete guidance - Fixed spelling: added 'namespacing' to project dictionary
Member
Author
|
ACK 48c3293 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses issue #121 by implementing a solution to prevent GitHub Copilot coding agent from timing out during pre-commit checks.
Changes
1. Environment Variable Renaming
Changed:
TORRUST_TD_SKIP_E2E_TESTS→TORRUST_TD_SKIP_SLOW_TESTSRationale:
SKIP_SLOW_TESTS) is clearer than condition-based (RUNNING_IN_AGENT_ENV)2. Expanded Test Skipping
Now skips in fast mode:
Still runs in fast mode:
3. Enhanced Pre-commit Messaging
When
TORRUST_TD_SKIP_SLOW_TESTS=true, the script now displays:Benefits:
4. Comprehensive Documentation
Added detailed timing tables to
docs/contributing/copilot-agent/pre-commit-config.md:Individual Task Timings:
Unit Tests Breakdown:
5. Documentation Organization
docs/contributing/copilot-agent/foldercopilot-agent-firewall.md→copilot-agent/firewall.mdcopilot-agent/README.mdindexcopilot-agent/pre-commit-config.mdcomprehensive setup guidePerformance Results
Testing
✅ Fast mode tested:
TORRUST_TD_SKIP_SLOW_TESTS=true ./scripts/pre-commit.sh✅ Full mode tested:
./scripts/pre-commit.sh✅ All markdown linting passes
✅ Messaging displays correctly with timing information
Next Steps for Repository Admins
Important: Update GitHub environment variable configuration:
TORRUST_TD_SKIP_E2E_TESTS→TORRUST_TD_SKIP_SLOW_TESTStrueCI Safety Net
Even though slow tests are skipped in pre-commit for Copilot agent, they still run:
This ensures no regressions slip through while keeping Copilot agent functional.
Related